﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Contract.Business.Entity;

namespace Fast.Presentation.WinForms.Cruds
{
    public partial class FrmConfirmacaoVenda : Form
    {
        public FrmConfirmacaoVenda()
        {
            InitializeComponent();
        }

        #region Atributos
        public BEVenda venda { get; set; }
        public bool confirmado { get; set; }
        #endregion  

        #region Eventos
        private void FrmConfirmacaoVenda_Load(object sender, EventArgs e)
        {
            this.dgvItem.AutoGenerateColumns = false;
            confirmado = false;
            this.lblNome.Text = venda.Cliente.Nome;
            this.lblTelefone.Text = venda.Cliente.TelResidencial;
            this.lblEndereco.Text = venda.Cliente.Endereco;

            this.dgvItem.DataSource = venda.Itens;
        }

        private void btnConfirmar_Click(object sender, EventArgs e)
        {
            confirmado = true;
            this.Close();
        }

        private void btnCancelar_Click(object sender, EventArgs e)
        {
            this.Close();
        }
        #endregion
    }
}
